x11: Fix handling of frame clock freezes
authorMatthias Clasen <mclasen@redhat.com>
Sun, 19 May 2019 02:53:17 +0000 (02:53 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 28 May 2019 20:25:15 +0000 (20:25 +0000)
commitfa9cbf6c7df3803211fa054e6ca6cfcf66666aa4
tree2464eaa8848d65c9ce0888e1637fcc955f511aa9
parentef353f24c65eda28e36ca47b912bdede5fad65ab
x11: Fix handling of frame clock freezes

Now that popups share the frame clock of their
parent, we have to be much more careful about
freezing the clock, since that may stop updates
for another surface.

This commit makes two changes that make the
X11 handling of the frame clock more similar
to the Wayland backend:
- Use gdk_surface_freeze_updates instead of
  gdk_surface_freeze_toplevel_updates to avoid
  affecting the frame clock
- Bail out early in before_paint/after_paint
  if the surface is frozen, to avoid affecting
  the frame clock

Together, these two make the X11 popup surface
type work without freezing updates for the toplevel.
gdk/x11/gdkdisplay-x11.c
gdk/x11/gdksurface-x11.c